<%@taglib uri="/WEB-INF/struts-html.tld"  prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html:form action="account.do?action=accountUpdate">
    <table width="100%" cellpadding="1" cellspacing="1">
        <tr class="netral2">
            <td width="100%" colspan="2"><bean:message key="account.kartu"/></td>
        </tr>
        <tr>
            <td width="100%" colspan="2">
                <table cellpadding="1" cellspacing="1" width="100%">
                    <tr class="header">
                        <td><bean:message key="label.no"/></td>
                        <td><bean:message key="account.kartu"/></td>
                        <td><bean:message key="account.nama"/></td>
                    </tr>
                    <logic:empty name="listAccountCard">
                        <tr class="form">
                            <td colspan="3" align="center"><bean:message key="account.kartu"/> <bean:message key="label.isEmpty"/></td>
                        </tr>
                    </logic:empty>
                    <logic:notEmpty name="listAccountCard">
                        <c:forEach var="listAccountCard" items="${listAccountCard}" varStatus="row">
                            <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
                            <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                                <td width="5%"><c:out value="${row.count}"/></td>
                                <td width="10%" align="left"><c:out value="${listAccountCard.noCard}"/></td>
                                <td align="left"><c:out value="${listAccountCard.nama}"/></td>
                            </tr>
                        </c:forEach>
                    </logic:notEmpty>
                    <tr class="form">
                        <td colspan="3" align="right"><html:link href="account.do?action=accountCardEdit" styleClass="noLink"><input type="button" value="${buttonEdit}"/></html:link></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr class="netral2">
            <td width="100%" colspan="2"><bean:message key="account.relasi"/></td>
        </tr>
        <tr>
            <td width="100%" colspan="2">
                <table cellpadding="1" cellspacing="1" width="100%">
                    <tr class="header">
                        <td><bean:message key="label.no"/></td>
                        <td><bean:message key="account.nama"/></td>
                        <td><bean:message key="account.umur"/></td>
                        <td><bean:message key="account.relasiship"/></td>
                    </tr>
                    <logic:empty name="listAccountRelation">
                        <tr class="form">
                            <td colspan="4" align="center"><bean:message key="account.relasi"/> <bean:message key="label.isEmpty"/></td>
                        </tr>
                    </logic:empty>
                    <logic:notEmpty name="listAccountRelation">
                        <c:forEach var="listAccountRelation" items="${listAccountRelation}" varStatus="row">
                            <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
                            <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                                <td width="5%"><c:out value="${row.count}"/></td>
                                <td width="65%"><c:out value="${listAccountRelation.nama}"/></td>
                                <td width="5%"><c:out value="${listAccountRelation.umur}"/></td>
                                <td width="35"><c:out value="${listAccountRelation.relasi}"/></td>
                            </tr>
                        </c:forEach>
                    </logic:notEmpty>
                    <tr class="form">
                        <td colspan="4" align="right"><html:link href="account.do?action=accountRelationEdit" styleClass="noLink"><input type="button" value="${buttonEdit}"/></html:link></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr class="netral">
            <td colspan="2"><bean:message key="account.account"/></td>
        </tr>
        <tr class="form">
            <td width="10%"><bean:message key="account.kode"/></td>
            <td>: <html:text property="kode" size="25" readonly="true"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="account.nama"/></td>
            <td>: <html:text property="nama" size="50"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="account.alamat"/></td>
            <td>: <html:text property="alamat" size="100"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="account.telp"/></td>
            <td>: <html:text property="telp" size="20"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="account.jabatan"/></td>
            <td>: <html:text property="statusJabatan" size="20"/></td>
        </tr>        
        <!--tr class="form">
            <td><!bean:message key="account.user"/></td>
            <td>:
                <!html:select property="user">
                    <!logic:iterate id="listUser" name="listUser">
                    <option value="<!bean:write name="listUser" property="id"/>"><!bean:write name="listUser" property="nama"/></option>
                    <!/logic:iterate>
                <!/html:select>
            </td>
        </tr-->
        <tr class="form">
            <td colspan="2" align="right"><input type="button" onclick="validate_form()" value="${buttonUpdate}"/><html:hidden property="id"/></td>
        </tr>
    </table>
</html:form>